import req from '@/utils/req'
import axios from 'axios'

const MODULE_URL = '/finaltest/';
export function getList(obj) {
  return req.get(MODULE_URL + 'listByPage?',obj);
}



//获得某条的详情
export function detailRow(id) {
  return req.get(MODULE_URL + 'update?id='+id)
}
//修改
export function updateRow(obj) {
  return req.postPayload(MODULE_URL+'update',obj)
}
//删除
export function delRows(obj) {
  return req.post(MODULE_URL+ 'deleteMany',obj)
}

//导入
export function importExal(obj,fuc) {

  let config = {
    headers: {'Content-Type': 'multipart/form-data'},
    withCredentials:true
  }
  // 添加请求头
  axios.post(process.env.BASE_API + MODULE_URL + 'import', obj, config)
    .then(response => {
      fuc(response.data);
    })
}
